package com.fandou.airobot.database;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

/**
 * @author Jm
 * @date 2020/7/9 15:33
 * @description 记录模式记录dao
 */
@Dao
public interface RecordDao {

    @Query("SELECT * FROM Record")
    List<Record> getAllRecords();

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    List<Long> insertRecord(Record... record);

    @Delete
    int deleteRecord(Record record);

    @Update
    int updateAlarm(Record record);

}
